Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Add fuzz testing for swap functionality, add rounding up (SC-482) #22

Merged
merged 37 commits into from
Jul 17, 2024

Conversation

lucas-manuel
Copy link
Contributor

@lucas-manuel lucas-manuel commented Jul 4, 2024

Rounding up twice on sDai conversions because the rate conversion rounding down led to decreases in PSM value still.

@lucas-manuel lucas-manuel requested review from hexonaut and barrutko July 4, 2024 18:37
@lucas-manuel lucas-manuel self-assigned this Jul 4, 2024
@lucas-manuel lucas-manuel changed the base branch from master to sc-490-add-exact-amount-out-swap July 4, 2024 18:37
Base automatically changed from sc-490-add-exact-amount-out-swap to master July 5, 2024 12:11
Copy link
Contributor

@hexonaut hexonaut left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. Some minor changes.

test/unit/SwapExactIn.t.sol Outdated Show resolved Hide resolved
test/unit/SwapExactIn.t.sol Outdated Show resolved Hide resolved
test/unit/SwapExactOut.t.sol Outdated Show resolved Hide resolved
test/unit/SwapExactOut.t.sol Outdated Show resolved Hide resolved
test/unit/SwapExactIn.t.sol Outdated Show resolved Hide resolved
@lucas-manuel lucas-manuel merged commit 039ae15 into master Jul 17, 2024
3 checks passed
@lucas-manuel lucas-manuel deleted the sc-482-swap-fuzz-testing branch July 17, 2024 09:45
Copy link

Coverage after merging sc-482-swap-fuzz-testing into master will be

99.04%

Coverage Report
FileStmtsBranchesFuncsLinesUncovered Lines
src
   PSM3.sol97.60%98.75%87.50%99.04%342, 345

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants